package com.sdlg.controller;


import com.sdlg.service.ReportService;
import com.sdlg.util.Result;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ReportController {

    @Resource
    private ReportService reportService;

    //饼图
    @ResponseBody
    @RequestMapping("/getSetmealReport")
    public Result getSetmealReport(){
        Result result=reportService.getSetmealReport();
        return result;
    }

    //折线图
    @ResponseBody
    @RequestMapping("/getMemberReport")
    public Result getMemberReport(){
        Result result=reportService.getMemberReport();
        return result;
    }

    //查询报告数据
    @ResponseBody
    @RequestMapping("/getBusinessReportData")
    public Result getBusinessReportData(){
        Result result=reportService.getBusinessReportData();
        return result;
    }


}
